<template>
  <van-row class="detail-page">
    <van-nav-bar
      fixed
      placeholder
      :title="QuestionMap[cid][index].QuestionTitle"
      left-arrow
      @click-left="onClickLeft"
    />
    <div
      v-html="QuestionMap[cid][index].QuestionDescription"
      style="font-size: 20px; margin: 0px 12px; margin-left: 7px"
    ></div>
    <div v-html="null" style="font-size: 20px"></div>
    <van-row class="help" style="font-size: 12px">
      仍未解决？前往<router-link to="/feedbackcustomerfeedback">
        <em>意见反馈</em>
      </router-link>
    </van-row>
  </van-row>
</template>

<script>
import {
  NavBar, Toast, Row, Form,
} from 'vant';
import { mapState } from 'vuex';
import request from '@/utils/request';

export default {
  name: 'detail',
  components: {
    [NavBar.name]: NavBar,
    [Row.name]: Row,
  },
  computed: {
    ...mapState(['QuestionMap']),
  },
  data() {
    return {
      newBox: null,
      title: '问题详情',
      myCategory: {},
      cid: '',
      index: 0,
    };
  },
  // 点击有toast返回
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    async getQuestion() {
      const getQuestion = {
        header: {
          invoker: 'C0644172-3875-4941-B6D8-AAB26581083B',
          apiTag: 'helpcate',
          appId: 'E4C10B56-B15A-4C8C-B378-11FFDAE4FD6D',
          pkgName: 'com.sfsm.quickstartapp',
          ua: '',
          model: 'model',
          versionCode: 1,
          versionName: '5.5.5',
        },
        body: {
          categroyId: this.$route.params.id,
        },
      };
      const { data } = await request({
        url: '/api/CSAPI',
        method: 'POST',
        data: {
          ...getQuestion,
        },
      });
      if (data.Code !== 200) return;
    },
  },
  created() {
    this.cid = this.$route.query.cid;
    this.index = this.$route.query.index - 0;
  },
};
</script>

<style lang="less" scoped>
//头部导航栏样式
.van-nav-bar {
  margin-bottom: 10px;
}
/deep/ .van-nav-bar .van-icon {
  color: #3b3b3b;
}
/deep/ .van-ellipsis {
  color: #3b3b3b;
  font-size: 19px;
}
/deep/ .van-nav-bar__text {
  color: #3b3b3b;
  font-size: 19px;
}
.detail-page {
  position: relative;
  margin-left: 17px;
}
.my-title {
  margin-top: 22px;
  font-size: 19px;
  color: #3b3b3b;
  line-height: 26px;
}
.content {
  font-size: 15px;
  color: #3b3b3b;
  margin: 18px 0px;
}
.help {
  width: 100%;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  bottom: 15px;
}
a {
  text-decoration: none;
}
.router-link-active {
  text-decoration: none;
}
</style>
